package com.jevons.geo_lib.op_history;


import com.mapbox.mapboxsdk.geometry.LatLng;

/**
 * Copyright 2020 JxGIS
 *
 * @file QiegeHistory
 * @auth linaisheng
 * Created on 2020/12/2.
 * Description：
 */
public class QiegeHistory implements OperationHistory {

    public enum Type {
        AddPoint,
        MovePoint
    }

    protected String featureTempId;
    protected LatLng newPoint;
    protected Type type;

    public QiegeHistory(String featureTempId, LatLng newPoint) {
        this.featureTempId = featureTempId;
        this.newPoint = newPoint;
        this.type = Type.AddPoint;
    }

    public QiegeHistory(String featureTempId, LatLng newPoint, Type type) {
        this.featureTempId = featureTempId;
        this.newPoint = newPoint;
        this.type = type;
    }

    @Override
    public String getOperateFlag() {
        return "op_qiege";
    }

    @Override
    public DrawType getDrawType() {
        return DrawType.Qiege;
    }

    public Type getType() {
        return type;
    }

    public LatLng getPoint() {
        return newPoint;
    }
}
